<!--
 Copyright 2025 Google LLC

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<div
  class="container grid grid-cols-1 lg:grid-cols-2 gap-4 px-5 text-center items-center min-h-screen m-auto text-white font-extrabold"
>
  <video
    class="fixed top-0 left-0 h-full w-full object-cover z-0"
    oncanplay="this.play()"
    onloadedmetadata="this.muted = true"
    muted
    playsinline
    loop
    autoplay
  >
    <source src="assets/videos/google-deepmind-veo3.mp4" type="video/mp4" />
  </video>

  <!-- Mobile View -->
  <div class="lg:hidden flex flex-col justify-center items-center gap-4 z-10">
    <h1 class="mat-display-large">
      Creative <span class="linear-text">Studio</span>
    </h1>
    <p class="login-app-text">
      <span class="linear-text">Create</span> at the speed <br />
      of <span class="linear-text">thought</span> 🚀
    </p>
    <button
      mat-raised-button
      color="primary"
      (click)="loginWithGoogle()"
      class="w-full max-w-xs h-12 text-lg"
    >
      Login with Google
    </button>
    <mat-spinner class="mt-5" [diameter]="50" *ngIf="this.loader"></mat-spinner>
  </div>

  <!-- Desktop View: Left Column -->
  <div class="hidden lg:flex flex-col justify-center items-center gap-4 z-10">
    <p class="login-app-text text-4xl">
      <span class="linear-text">Create</span> at the speed <br />
      of <span class="linear-text">thought</span> 🚀
    </p>
  </div>

  <!-- Desktop View: Right Column -->
  <div class="hidden lg:flex flex-col justify-center items-center gap-4 z-10">
    <mat-card class="login-card bg-white/10 backdrop-blur-md p-8 rounded-2xl">
      <mat-card-header class="!justify-center">
        <mat-card-title>
          <h1 class="mat-display-large mb-5">
            Creative <span class="linear-text">Studio</span>
          </h1>
        </mat-card-title>
      </mat-card-header>
      <mat-card-content class="flex flex-col items-center">
        <p class="register-text mb-4">
          Single Sign on with your Google Account
        </p>
        <button
          mat-raised-button
          color="primary"
          (click)="loginWithGoogle()"
          class="w-full h-12 text-lg login-btn"
        >
          Login with Google
        </button>
        <mat-spinner
          class="mt-5 m-auto"
          [diameter]="50"
          *ngIf="this.loader"
        ></mat-spinner>
      </mat-card-content>
    </mat-card>
  </div>
</div>
